The past decade has seen major advances in the tools available to neuroscientists, making it possible to ask increasingly specific questions regarding which neurons and circuits are correlated with, necessary for, and sufficient for, specific behavioral or computational functions. Two-photon laser scanning microscopy (TPLSM) is a widespread tool that allows three-dimensional imaging and photo-stimulation deep within intact brain tissue at neuron resolution. Numerous microscope manufacturers supply turnkey TPLSM systems that provide basic functionality for controlling the microscope during experiments, but no commercially available system allows the intricate experiments required to test the complex hypotheses of interest in systems neuroscience today. Vidrio?s mission is to address this gap with its software product, ScanImage, in a way that is stable, flexible, and of commercial-quality. Experimentalists need to perform ?closed-loop? experiments in which salient neurons are selected for temporally specific manipulation based on ongoing experimental results. Such capabilities are necessary because it is difficult to predict in advance which neurons will be engaged by the function under study and because neurons? involvement in computations are often restricted to specific phases of a task. This functionality requires software new scanning modes with real-time analysis and control. In our Phase 1 application we laid out a complete software development plan for enabling closed-loop TPLSM experiments. We demonstrated the feasibility of our approach in our Phase 1 work, which comprised integrating advanced laser-scanning capabilities with online CPU-based and FPGA-based data processing. Here we propose to complete our plan in Phase 2 by implementing the remaining key features needed for the next generation of systems neuroscience experiments. First, it is critical to be able to image one set of cells while simultaneously manipulating another set, in 3D. In Phase 1 work, we added control for two laser scanning paths to achieve X-Y independence; here in phase 2 we will add Z-control to achieve 3D targeting with 2um accuracy. Second, we will implement algorithms to enable interactive identification and motion- compensated targeting of salient neurons, by capitalizing on the high levels of data parallelism achieved by the CPU and FPGA implementations in Phase 1 work. Presenting researchers with ongoing maps of the correlations between neuronal activity in the field of view and their own quantitative definition of salience will allow them to rapidly select neurons for manipulation. Third, we will make this functionality easily accessible by designing and fabricating a reasonably priced ScanImage-optimized computer hardware device that integrates microscope control, data acquisition, and real-time image analysis. Successful completion of this project will enable Vidrio to market ScanImage in a financially self-sustaining manner, thus empowering researchers to elucidate how functionally defined subpopulations of neurons mediate specific information-processing functions at key moments during behavior, in healthy animals and in animal models of neurological diseases.